<?php

    @include_once("conn.php");
    // 接收一个用户名判断该用户正在数据库中是否存在

    $email = $_GET["email"];
    // $user = "a123123aa";

    $search = "select * from `userinfo` where email = '$email' ";

    $result = mysqli_query($conn,$search);

    $item = mysqli_fetch_assoc($result);

    $msg = array();
    if(!$item){
        $msg["status"] = true;
        $msg["msg"] = "可以使用的邮箱";
    }else{
        $msg["status"] = false;
        $msg["msg"] = "该邮箱已注册";
    }

    echo json_encode($msg);




?>